package com.woniuxy.service.impl;

import com.woniuxy.dao.InpatientOperationDao;
import com.woniuxy.entity.InpatientOperation;
import com.woniuxy.service.InpatientOperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Service
public class InpatientOperationServiceImpl implements InpatientOperationService {
    @Autowired
    InpatientOperationDao inpatientOperationDao;

    @Override
    public void insertInpatientOperation(InpatientOperation inpatientOperation) {
        inpatientOperation.setInpatientOperationTime(new Date());
        inpatientOperationDao.insertInpatientOperation(inpatientOperation);
    }

    @Override
    public List<InpatientOperation> getInpatientOperations(int inpatientId) {
        List<InpatientOperation> inpatientOperations = inpatientOperationDao.selectInpatientOperation(inpatientId);
        return inpatientOperations;
    }

    @Override
    public void updateOperationResult(int inpatientOperationId, String inpatientOperationResult) {
        inpatientOperationDao.updateInpatientOperationResult(inpatientOperationId, inpatientOperationResult);
    }
}
